﻿using BCCommon;
using BCEntity.TMS.Agent.AgentApplication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.Agent.AgentApplication
{
    public class AgentApplicationRecordData : IAgentApplicationRecordData
    {
        private readonly IDatabaseContext database;

        public AgentApplicationRecordData(IDatabaseContext database)
        {
            this.database = database;
        }

        private const string QUERY = @"SELECT AgentApplicationRecordId,ApprovalStatus,ApplyCode,Content,CreateTime,CreateAdminId,CreateAdminName,UpdateTime,Remark 
                                    FROM AgentApplicationRecord";

        public async Task<AgentApplicationRecordEntity> Insert(AgentApplicationRecordEntity entity)
        {
            return await database.Master.InsertAsync(entity);
        }
    }
}
